package StudyCode.summary.Basic.stringbuffer;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class StringBufferInsert {
	public static void main(String[] args) {

		boolean b = true;
		StringBuffer sb1 = new StringBuffer("Hello  World");
		sb1.insert(6, b);
		System.out.println(sb1);

		char c = 'T';
		StringBuffer sb2 = new StringBuffer("Hello  World");
		sb2.insert(6, c);
		System.out.println(sb2);

		char[] c1 = new char[]{'t', 'a', 'h', '1', '9', '8', '6'};
		StringBuffer sb3 = new StringBuffer("Hello  World");
		sb3.insert(6, c1);
		System.out.println(sb3);

		double d = 110.0;
		StringBuffer sb4 = new StringBuffer("Hello  World");
		sb4.insert(6, d);
		System.out.println(sb4);

		float f = 110.0f;
		StringBuffer sb5 = new StringBuffer("Hello  World");
		sb5.insert(6, f);
		System.out.println(sb5);

		int i = 110;
		StringBuffer sb6 = new StringBuffer("Hello  World");
		sb6.insert(6, i);
		System.out.println(sb6);

		long l = 110;
		StringBuffer sb7 = new StringBuffer("Hello  World");
		sb7.insert(6, l);
		System.out.println(sb7);

		Object obj = "tah1986";
		StringBuffer sb8 = new StringBuffer("Hello  World");
		sb8.insert(6, obj);
		System.out.println(sb8);

		String str = "www.tah1986.com";
		StringBuffer sb9 = new StringBuffer("Hello  World");
		sb9.insert(6, str);
		System.out.println(sb9);
	}
}
